class_name 狙炮Operation extends Node


var operationManager:OperationManager
var big:Big

func init(om:OperationManager):
	self.operationManager = om
	return self

func preparation_狙炮_aim():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsHasView()
	for p in arrAroundPoints:
		if p.is_view:
			if p.real_terrain == Terrain.jing:
				continue
			if p.small != null:
				continue
			if p.big != null:		#有大子
				if p.big.player.is_me:	#是自己的
					continue
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func 狙炮_aim(point:Point):
	WebSocketManager.sendObj(true,"狙炮_aim",{"start":big.point.id,"end":point.id})
	operationManager.cancel()
